
<script type="text/javascript">
/* <![CDATA[ */

var popupW = 640;
var popupH = 500;

{literal}
	function popupOpenId2(modulo, script, param)
	{
		popupW = 600;
		popupH = 480;
		_popupOpenId(modulo, script, param);
	}
	
	function popupOpenId(modulo, script, param)
	{
		popupW = 530;
		popupH = 400;
		_popupOpenId(modulo, script, param);
	}
	
	function popupOpenId3(modulo, script, param)
	{
		popupW = 960;
		popupH = 600;
		_popupOpenId3(modulo, script, param);
	}
	
	function _popupOpenId(modulo, script, param)
	{
		var popupO = ",scrollbars=yes,status=no,location=no,resizable=no,toolbar=no,dependent";
		
		if (parseInt(navigator.appVersion) > 3) 
		{
			if (navigator.appName=="Netscape") 
			{
				winW = window.innerWidth;
				winH = window.innerHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) 
			{
				winW = screen.availWidth;
				winH = screen.availHeight;
			}
		}
		var posx = parseInt((winW - popupW) / 2);
		var posy = parseInt((winH - popupH) / 2) + 50;
		var url = "Main.php?mod="+ modulo +"&do="+ script +"&sessid=" + sessid + param;	
		window.open(url, '', "top=" + posy + ",left=" + posx + ",width=" + popupW + ",height=" + popupH + popupO);
	}
	
	function _popupOpenId3(modulo, script, param)
	{
		var popupO = ",scrollbars=yes,status=no,location=no,resizable=no,toolbar=no,dependent";
		
		if (parseInt(navigator.appVersion) > 3) 
		{
			if (navigator.appName=="Netscape") 
			{
				winW = window.innerWidth;
				winH = window.innerHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) 
			{
				winW = screen.availWidth;
				winH = screen.availHeight;
			}
		}
		var posx = parseInt((winW - popupW) / 2);
		var posy = parseInt((winH - popupH) / 2) + 50;
		var url = "Main.php?mod="+ modulo +"&do="+ script +"&sessid=" + sessid + param;	
		window.open(url, '', "top=" + posy + ",left=" + posx + ",width=" + popupW + ",height=" + popupH + popupO);
	}

	function popupOpen(fieldId, fieldDesc, script, e, fieldFilter, fieldClear)
	{
		var popupW = 610;
		var popupH = 370;
		var popupO = ",scrollbars=yes,status=no,location=no,resizable=no,toolbar=no,dependent";
        var posx = 0;
        var posy = 0;
		var url = "";
		
		if (parseInt(navigator.appVersion) > 3) 
		{
			if (navigator.appName=="Netscape") 
			{
				winW = window.innerWidth;
				winH = window.innerHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) 
			{
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
				//winH = screen.availHeight;
			}
		}
	
		posx = parseInt((winW - popupW) / 2);
		posy = parseInt((winH - popupH) / 2) + 50;

		url = "Main.php?"+ script +"&sessid=" + sessid;
		url+= "&fieldId=" + fieldId + "&fieldDesc=" + fieldDesc;
		
		if ( fieldFilter != "" )
		{	
			var fldFilter = fieldFilter.split(",");
			var fld = "";
			cnt = fldFilter.length;
			while ( cnt-- )
			{
				if ( fld != "" ) fld += "*";
				if ( fldFilter[cnt] != "none" || fldFilter[cnt] != "" )
					fld += fldFilter[cnt] + "|" + document.forms[0].elements[ fldFilter[cnt] ].value;
			}
			url += "&fieldFilter=" + fld;
		}
		else
		{
			url+= "&fieldFilter=";
		}
		
		url+= "&fieldClear=" + fieldClear;
		//alert(url);
		window.open(url, "", "top=" + posy + ",left=" + posx + ",width=" + popupW + ",height=" + popupH + popupO);
	}
{/literal}
/* ]]> */
</script>
